package com.example.pojo;

import jakarta.persistence.*;

import java.util.Date;


@Entity
@Table(name = "tb_user")
public class User {

    // 主键 id
    // GenerationType 用于指定主键的生成策略，包含以下几种:
    // IDENTITY: 使用数据库的自增长列作为主键生成策略
    // SEQUENCE: 使用数据库的序列来生成主键，需要配置@SequenceGenerator
    // TABLE: 使用一个特定的数据库表格来保存主键，需要配置@TableGenerator
    // AUTO: 由JPA自动选择合适的策略，默认值
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    // 用户名
    @Column(name = "user_name")
    private String userName;
    @Column(name = "user_id")
    private String userId;
    // 密码
    @Column(name = "password")
    private String password;
    // 手机号
    @Column(name = "phone")
    private String phone;
    // 邮箱
    @Column(name = "email")
    private String email;
    // 注册时间
    @Column(name = "create_time")
    private Date createTime;
    // 更新时间
    @Column(name = "update_time")
    private Date updateTime;

    public Integer getId() {
        return id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Date getCreateTime(Date createTime) {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }


    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

}
